package com.haha.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.haha.common.utils.PageUtils;
import com.haha.gulimall.product.entity.AttrEntity;
import com.haha.gulimall.product.vo.AttrResponseVo;
import com.haha.gulimall.product.vo.AttrVo;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author xiongweizhong
 * @email xiongwei@gmail.com
 * @date 2022-06-22 23:36:06
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVo attr);

    PageUtils getBaseAttrList(Map<String, Object> params, Long catelogId, String type);

    AttrResponseVo getAttrInfo(Long attrId);

    void updateAttr(AttrResponseVo attrResponseVo);

    List<AttrEntity> getRelationAttr(Long attrgroupId);

    /**
     * * 获取分组还没有关联的属性
     *
     * @param params
     * @param attrgroupId
     * @return
     */
    PageUtils getNoRelationAttr(Map<String, Object> params, Long attrgroupId);

    List<Long> selectSerarchAttrIds(List<Long> attrIds);
}

